import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import vantConfig from 'vant'
import 'vant/lib/index.css'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import hasRole from '@/directive/permission/hasRole'

const app = createApp(App)
const store = createPinia()
store.use(piniaPluginPersistedstate)
app.use(vantConfig)
// 注册指令
app.directive('role', hasRole)
app.use(router)
app.use(store)
app.mount('#app')
